.calculator {
  display: inline-grid;
  grid-template-columns: repeat(4, 3rem);
  grid-template-rows: repeat(6, 3rem);
  gap: 0.5rem;
}

.calculator .display {
  border: 1px solid black;
  width: 100%;
  grid-column-start: 1;
  grid-column-end: 5;
  text-align: right;
  font-size: 1.75rem;
  line-height: 2rem;
  padding: 0.1em 0.15em 0.5em;
  overflow-x: auto;
  overflow-y: hidden;
}

.calculator .clear {
  background-color: red;
  color: white;
}

.calculator .equals {
  grid-column-start: 1;
  grid-column-end: 4;
}

.calculator .zero {
  grid-column-start: 2;
  grid-column-end: 4;
}

.calculator button {
  cursor: pointer;
  font-size: 1rem;
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.calculator button:active {
  background-color: black;
  color: white;
}
